package com.ctsi.ftp.util;

import java.text.DecimalFormat;

/**
 * Created by sxs on 2016/3/24.
 */
public class FileIdGenerator {
    private static long fileID=0L;
    private static String id="000000000000";


    public static synchronized  String getId(){

        if(fileID<=999999999999L){
            fileID++;
        }else{
            fileID=0L;
        }
        DecimalFormat df=new DecimalFormat("000000000000");
        id = df.format(fileID);
        return id;
    }

}
